#ifndef SM2_H
#define SM2_H

#include <openssl/ec.h>
#include <stddef.h>

EC_KEY* generate_sm2_keypair();
int sm2_encrypt(const unsigned char *plaintext, size_t plaintext_len, EC_KEY *pub_key, unsigned char **ciphertext, size_t *ciphertext_len);
int sm2_decrypt(const unsigned char *ciphertext, size_t ciphertext_len, EC_KEY *priv_key, unsigned char **plaintext, size_t *plaintext_len);

#endif // SM2_H
